<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class User extends AppModel {
    var $name = 'User';
    var $primaryKey = 'userid';
    var $hasAndBelongsToMany = array(
        'Group' => array(
            'className' => 'Group',
            'joinTable' => 'users_groups',
            'foreignKey' => 'userid',
            'associationForeignKey' => 'groupid',
            'unique' => true,
            'with' => 'UserGroup'
        )
    );
    /* extra array options
                'conditions' => '',
            'fields' => '',
            'order' => '',
            'limit' => '',
            'offset' => '',
            'finderQuery' => '',
            'deleteQuery' => '',
            'insertQuery' => '' */
}


?>
